package com.example.prototipos;

import android.app.Activity;
import android.os.Bundle;
import android.widget.ExpandableListView;
import android.widget.TextView;
import com.example.prototipos.genericas.MyExpandableAdapter;
import com.example.prototipos.genericas.Preferencia;

public class ConsultaRevisoes extends Activity {

	private ExpandableListView expList;
	private MyExpandableAdapter adapter;
	private TextView lblVeiculoEscolhido;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.list_view_expandivel);
		
		
		buscarControles();
		setarValorVeiculoEscolhido();
		adapter = new MyExpandableAdapter(this);
		expList.setAdapter(adapter);
		
	}
	
	private void buscarControles(){
		expList = (ExpandableListView) findViewById(R.id.listExpandivel);
		lblVeiculoEscolhido = (TextView)findViewById(R.id.lblveiculoEscolhido);
	}
	
	private void setarValorVeiculoEscolhido(){
		lblVeiculoEscolhido.setText(Preferencia.obterPreferencia(ConsultaRevisoes.this, "Veiculo", ""));
	}
		
	 
}
